#!/bin/sh

/etc/init.d/uhttpd restart
/etc/init.d/rpcd reload

[ -e /etc/config/sysupgrade ] && return 0

touch /etc/config/sysupgrade

uci -q batch <<EOF
set sysupgrade.server=server
set sysupgrade.server.url='https://download.openmptcprouter.com'
set sysupgrade.client=client
set sysupgrade.client.upgrade_packages='0'
set sysupgrade.client.auto_search='0'
set sysupgrade.client.advanced_mode='0'
commit sysupgrade
EOF

return 0
